cmake_minimum_required(VERSION 2.8)

project(wishmaster2-network)

include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include)

set (PROJECT wishmaster2-network)
set (wishmaster2-network-sources
	src/httpnetworkmedium.cpp
	src/httprequest.cpp
	src/httpnetworkcontext.cpp
	src/httpcachingresolver.cpp
	src/standardrequestmanager.cpp
	src/url.cpp
	src/wishmaster2-network.cpp
)

SET(CMAKE_CXX_FLAGS  "-O2 -Wall -g --std=c++0x -fPIC")

# Boost stuff:

set (Boost_USE_STATIC_LIBS ON)
set (Boost_USE_MULTITHREADED ON)

find_package(Boost COMPONENTS system regex thread REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})

find_package(Threads REQUIRED)

add_library(${PROJECT} ${wishmaster2-network-sources} )
target_link_libraries(${PROJECT} ${CMAKE_THREAD_LIBS_INIT} ${Boost_LIBRARIES})